package com.yoshino.mediator;

/**
 * @author yoshino
 **/
public class TV extends Colleague{
    public TV(Mediator mediator, String name) {
        super(mediator, name);
        mediator.Register(name, this);
    }

    @Override
    public void SendMessage(int stateChange) {
        this.GetMediator().GetMessage(stateChange, this.name);
    }

    public void StartTv() {
        System.out.println("开电视");
    }

    public void StopTv() {
        System.out.println("关电视");
    }
}
